<%@ Reference Control="~/Controls/MusicTabs.ascx" %>
<%@ Page language="vb" Inherits="_2bMatesSite.view_news" ValidateRequest="false" CodeFile="view_news.aspx.vb" CodeFileBaseClass="_2bMatesSite.BaseWebPage" %>
<%@ Register tagprefix="MusicTabs" Tagname="MusicTabs" Src="Controls/MusicTabs.ascx" %>
<form id="Form1" method="post" runat="server">
	<table height="100%" cellspacing="0" cellpadding="0" width="100%" align="center" border="0">
		<tr>
			<td class="page_title"><asp:literal id=litPageLabel runat="server"></asp:literal></td>
		</tr>
		<tr id="trItem" runat=server>
			<td valign="top" width="100%" height="100%" class="main_table_border">
				<div class="content">
					<table cellspacing="0" cellpadding="0" width="100%" border="0">
						<tr id="trUserCanceledMessage" runat=server class="hidden">
							<td align=center height="20" colspan=5><asp:label id="lblErrMessageCanceled" runat=server cssclass="err_canceled_user">This member has cancelled their membership.</asp:label></td>
						</tr>
						<MusicTabs:MusicTabs id="ucMusicTabs" runat="server"></MusicTabs:MusicTabs>										
						<tr>
							<td height="4" class="small">&nbsp;</td>
						</tr>
						<tr>
							<td valign="top">
								<table border="0" cellpadding="0" cellspacing="0" width="100%">
									<tr>
										<td width="172" valign=top>
											<table height="100%" cellspacing="0" cellpadding="0" width="100%" border="0" class="music_table">
												<tr>
													<td class="title" height="19"><b><asp:label id="lblLCTitle" runat="server">Band Interviews</asp:label></b></td>
												</tr>																	
												<tr>
													<td align="center"><img src="images/spacer.gif" height=3 width=1><br>
														<asp:datagrid id="dgNewsItems" runat="server" autogeneratecolumns="False" gridlines="None" width="90%" showheader=false>
															<itemstyle verticalalign="Top"></itemstyle>
																<columns>
																	<asp:templatecolumn>
																		<itemtemplate>
																			<img src="images/spacer.gif" height=5 width=1><br>																			
																			<asp:hyperlink id=hlItem runat="server" navigateurl='<%# DataBinder.Eval(Container.DataItem, "ItemURL") %>' cssclass="main_text">
																				<%# DataBinder.Eval(Container.DataItem, "ItemName") %>
																			</asp:hyperlink>
																		</itemtemplate>
																	</asp:templatecolumn>
																</columns>
														</asp:datagrid>
														<asp:label id="lblNoNewsItems" runat="server" visible="False" height="20px"></asp:label>
														<br>
													</td>
												</tr>
											</table>
										</td>
									<td class="small" width="6">&nbsp;</td>
									<td class="small" width="563" valign="top">
										<table cellspacing="0" cellpadding="0" width="100%" border="0" class="music_table">													
											<tr>
												<td class="title" height="19"><b><!-- <asp:label id="lblUserName" runat="server">Label</asp:label> --><asp:label id="lblRCTitle" runat="server">Band Interviews</asp:label></b></td>
											</tr>
											<tr>
												<td valign="top" align="center">
													<table cellspacing="0" cellpadding="0" width="95%" border="0" class="main_text">
														<tr>
															<td class="small" height="10">&nbsp;</td>
														</tr>
														<tr>
															<td>
																<b><asp:image id="imgNewsImage" runat="server" cssclass="small_image" style="float:right;" ToolTip='2bmates.com'></asp:image>
																<asp:hyperlink id="hlUserGroup" runat="server" cssclass="small_image" style="float:right;"></asp:hyperlink><asp:label id="lblTitle" runat="server">News title</asp:label></b><br><i><asp:label id="lblSubtitle" runat="server">News subtitle</asp:label></i><br>
																	<br /><pre style="WORD-WRAP: break-word" wrap><asp:label id="lblNews" runat="server">News text</asp:label></pre>
															</td>
														</tr>
														<tr>
															<td><!-- <asp:hyperlink id="hlUserGroup1" runat="server" cssclass="main_text_bold">Go to {0} profile</asp:hyperlink> -->
																<br/>&nbsp;
															</td>
														</tr>
													</table>
												</td>
											</tr>
										<tr>
											<td class="small" valign="top" height="4" align="left">&nbsp;</td>
										</tr>															
										<tr>
											<td valign="top" height="100%" align="center">
												<table height="99%" cellspacing="1" cellpadding="0" width="95%" border="0">
													<tr>
														<td align=center>
															<table cellspacing=0 cellpadding=0 border="0" width="50%">
																<tr>
																	<td class="music_post_comments" height="19"><b><asp:label id="lblPostComments" runat="server">Post Comments</asp:label></b></td>
																</tr>																													
																<tr>
																	<td id="error" align="left"><asp:validationsummary id="ValidationSummary1" runat="server" forecolor="#F04C03" displaymode="List" cssclass="val_summary" Height="32px"></asp:validationsummary></td>
																</tr>
																<tr>
																	<td class="small" align="center">
																		<asp:textbox id="txtComment" runat="server" cssclass="scrollbar" width="300px" height="130px"
																			maxlength="1000" textmode="MultiLine" rows="8"></asp:textbox><asp:requiredfieldvalidator id="rvTxtComments" runat="server" controltovalidate="txtComment" display="None"
																			errormessage="<br>You cannot post blank comment<br>"></asp:requiredfieldvalidator></td>
																</tr>
																<tr>
																	<td align="center"><br /><asp:button id="btnPostComment" runat="server" cssclass="btn" width="50px" text="Post" onmouseover="ButtonMouseOver(this);" onmouseout="ButtonMouseOut(this);" onclick="btnPostComment_Click"></asp:button></td>
																</tr>
																<tr>
																	<td class="small" height="15">&nbsp;</td>
																</tr>																																	
															</table>
														</td>
													</tr>
													<tr>
														<td align="center"><asp:datagrid id="dgComments" runat="server" width="100%" autogeneratecolumns="False"
																gridlines="None" pagesize="100" pagerstyle-horizontalalign="Right" pagerstyle-mode="NumericPages">
																<itemstyle cssclass="data_grid" verticalalign="Top"></itemstyle>
																<headerstyle cssclass="data_grid_header"></headerstyle>
																<columns>
																	<asp:templatecolumn headertext="From">
																		<headerstyle width="10%"></headerstyle>
																		<itemstyle cssclass="col_image" verticalalign="Top"></itemstyle>
																		<itemtemplate>
																			<asp:hyperlink id=hlSenderName runat="server" cssclass="main_text_bold" text='<%# DataBinder.Eval(Container.DataItem, "SenderName") %>' font-bold="True" navigateurl='<%# DataBinder.Eval(Container.DataItem, "MemberURL") %>' onclick='<%# DataBinder.Eval(Container.DataItem, "OnClickJS") %>'></asp:hyperlink>
																			<br>
																			<asp:hyperlink id=hlSenderImage runat="server" cssclass="small_image" navigateurl='<%# DataBinder.Eval(Container.DataItem, "MemberURL") %>' imageurl='<%# DataBinder.Eval(Container.DataItem, "SenderImageURL") %>' onclick='<%# DataBinder.Eval(Container.DataItem, "OnClickJS") %>' ToolTip='<%# DataBinder.Eval(Container.DataItem, "SenderNameFull") %>'></asp:hyperlink>
																			<br>
																		</itemtemplate>
																		<footerstyle horizontalalign="Left" verticalalign="Top"></footerstyle>
																	</asp:templatecolumn>
																	<asp:templatecolumn headertext="&nbsp;&nbsp;Comments">
																		<headerstyle width="90%"></headerstyle>
																		<itemstyle horizontalalign="Left" cssclass="data_grid" verticalalign="Top"></itemstyle>
																		<itemtemplate>
																			<br>
																				<asp:label id=lblDate runat="server" text='<%# DataBinder.Eval(Container.DataItem, "Date") %>'></asp:label><br>
																				<br>
																				<pre style="WORD-WRAP: break-word;" wrap><asp:literal id=litComment runat="server" text='<%# DataBinder.Eval(Container.DataItem, "Comment") %>'></asp:literal></pre><br />
																				<asp:linkbutton id=lbDelete runat="server" cssclass="main_text_bold" visible='<%# DataBinder.Eval(Container.DataItem, "ButtonsVisibility") %>' commandname="Delete" commandargument='<%# DataBinder.Eval(Container.DataItem, "CommentID") %>' causesvalidation="False" font-bold="True">Delete</asp:linkbutton>&nbsp;
																		</itemtemplate>
																		<footerstyle horizontalalign="Left" verticalalign="Top"></footerstyle>
																	</asp:templatecolumn>
																</columns>
																<pagerstyle horizontalalign="Right" mode="NumericPages"></pagerstyle>
															</asp:datagrid><asp:label id="lblNoComments" runat="server" visible="False" cssclass="main_text">There are no comments posted.</asp:label></td>
														</tr>
													</table>
												</td>
											</tr>
										</table>
									</td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>						
		</TD>
	</TR>
	<tr id="trConfirmItem" runat=server visible=false>
		<td valign="top" width="100%" height="100%" class="main_table_border">
			<div class="content">
				<table cellspacing="1" cellpadding="0" border="0" class="main_text">					
					<tr>
						<td height=76>
							<asp:label id="lblMessage" runat="server" font-bold="True">This is how your comment will appear on the page. Please confirm your comment:</asp:label>
							<br>
							<br>
							<pre style="WORD-WRAP: break-word" wrap><asp:label id="lblComment" runat="server">Description</asp:label></pre><br />
						</td>
					</tr>
					<tr>
						<td valign="top">
							<asp:button id="btnPost" runat="server" cssclass="btn" text="Post Comment" width="113px" onmouseover="ButtonMouseOver(this);" onmouseout="ButtonMouseOut(this);" onclick="btnPost_Click"></asp:button><br><br>
							<asp:button id=btnEdit runat="server" cssclass="btn" text="Edit"  onmouseover="ButtonMouseOver(this);" onmouseout="ButtonMouseOut(this);" onclick="btnEdit_Click"></asp:button>
							<asp:button id="btnCancel" runat="server" cssclass="btn" text="Cancel" causesvalidation="False"  onmouseover="ButtonMouseOver(this);" onmouseout="ButtonMouseOut(this);" onclick="btnCancel_Click"></asp:button>
						</td>
					</tr>
				</table>
			</div>
		</td>
	</tr>
</TABLE>
				
</form>
<script>
	function confirmPost(){
		var conf = confirm("Are you sure you want to post this comment?")
		
		if ( conf )
			document.forms[0].submit();
	}
</script>

